package com.atguigu.method;

import java.io.File;

public class FileTest {
    public static void main(String[] args) {
        File f = new File("d:\\1.txt");

        System.out.println(f.getName());//文件名
        System.out.println(f.getPath());//路径
    }
}
